package com.shop.login.controller;

import com.alibaba.fastjson.JSON;
import com.shop.login.entiyy.Users;
import com.shop.login.service.WYWUserService;
import com.shop.user.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@org.springframework.stereotype.Controller
public class Controller {

    @Autowired
    private WYWUserService service;

    @RequestMapping("/mm")
    public String chaxun(){
        return "head";
    }



    @RequestMapping("/updateg")
    @ResponseBody
    public String upa(Users users){

        boolean b = service.updateUser(users);

        return JSON.toJSONString(b);
    }

    @RequestMapping("/uppda")
    public String up(){
        return "pwdmodify";
    }


}
